package top.kaoshanji.r1ch06b;

import org.springframework.context.ApplicationListener;

/**
 * 代码清单-r1ch06b-214页b：自定义一个事件监听器
 * @author kaoshanji
 * ^_^
 * create time 2025/5/6 19:53
 */
public class MailSendListener implements ApplicationListener<MailSendEvent> {

    @Override
    public void onApplicationEvent(MailSendEvent event) {
        MailSendEvent mse = (MailSendEvent) event;
        System.out.println("MailSendListener:向" + mse.getTo() + "发送完一封邮件");
    }
}
